package com.opm.security.core.model;

import java.util.Collection;

import org.springframework.security.core.GrantedAuthority;
import org.springframework.security.core.userdetails.UserDetails;

public class ExternalUserDetailsImpl implements ExternalUserDetails {

   private static final long serialVersionUID = 1L;

   private UserDetails extUserDetails;

   public Collection<GrantedAuthority> getAuthorities() {
      return extUserDetails.getAuthorities();
   }

   public String getPassword() {
      return extUserDetails.getPassword();
   }

   public String getUsername() {
      return extUserDetails.getUsername();
   }

   public boolean isAccountNonExpired() {
      return extUserDetails.isAccountNonExpired();
   }

   public boolean isAccountNonLocked() {
      return extUserDetails.isAccountNonLocked();
   }

   public boolean isCredentialsNonExpired() {
      return extUserDetails.isCredentialsNonExpired();
   }

   public boolean isEnabled() {
      return extUserDetails.isEnabled();
   }

   public UserDetails getExtUserDetails() {
      return this.extUserDetails;
   }

   public void setExtUserDetails(UserDetails extUserDetails) {
      this.extUserDetails = extUserDetails; 
   }

}
